export default {
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'Home',
      component: () => import('@/views/Home')
    },
    {
      path: '/about',
      name: 'About',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import(/* webpackChunkName: "about" */ '@/views/About')
    },
    {
      path: '/login',
      name: 'Login',
      component: () => import('@/views/Login')
    },
    {
      path: '/register',
      name: 'Register',
      component: () => import('@/views/Register')
    },
    {
      path: '/personal',
      name: 'Personal',
      component: () => import('@/views/Personal'),
      meta: {
        auth: true
      }
    },
    {
      path: '/protected',
      name: 'Protected',
      component: () => import('@/views/Protected'),
      meta: {
        auth: true
      }
    },
    {
      path: '/auth',
      name: 'Auth',
      component: () => import('@/views/Auth')
    },
    {
      path: '/channels/:chanId',
      name: 'ChannelNews',
      component: () => import('@/views/ChannelNews')
    },
    {
      path: '*',
      name: 'NotFound',
      component: () => import('@/views/NotFound')
    }
  ]
}
